// Decompiled by Jad v1.5.8e2. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://kpdus.tripod.com/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi space 
// Source File Name:   DefaultRenderer.java

package org.achartengine.renderer;

import android.graphics.Typeface;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

// Referenced classes of package org.achartengine.renderer:
//			SimpleSeriesRenderer

public class DefaultRenderer
	implements Serializable
{

	private String mChartTitle;
	private float mChartTitleTextSize;
	public static final int NO_COLOR = 0;
	public static final int BACKGROUND_COLOR = 0xff000000;
	public static final int TEXT_COLOR = 0xffcccccc;
	private static final Typeface REGULAR_TEXT_FONT;
	private String mTextTypefaceName;
	private int mTextTypefaceStyle;
	private int mBackgroundColor;
	private boolean mApplyBackgroundColor;
	private boolean mShowAxes;
	private int mAxesColor;
	private boolean mShowLabels;
	private int mLabelsColor;
	private float mLabelsTextSize;
	private boolean mShowLegend;
	private float mLegendTextSize;
	private boolean mFitLegend;
	private boolean mShowGrid;
	private boolean mShowCustomTextGrid;
	private List mRenderers;
	private boolean mAntialiasing;
	private int mLegendHeight;
	private int mMargins[] = {
		20, 30, 10, 20
	};
	private float mScale;
	private boolean mPanEnabled;
	private boolean mZoomEnabled;
	private boolean mZoomButtonsVisible;
	private float mZoomRate;
	private boolean mExternalZoomEnabled;
	private float mOriginalScale;
	private boolean mClickEnabled;
	private int selectableBuffer;
	private boolean mInScroll;

	public DefaultRenderer()
	{
		mChartTitle = "";
		mChartTitleTextSize = 15F;
		mTextTypefaceName = REGULAR_TEXT_FONT.toString();
		mTextTypefaceStyle = 0;
		mShowAxes = true;
		mAxesColor = 0xffcccccc;
		mShowLabels = true;
		mLabelsColor = 0xffcccccc;
		mLabelsTextSize = 10F;
		mShowLegend = true;
		mLegendTextSize = 12F;
		mFitLegend = false;
		mShowGrid = false;
		mShowCustomTextGrid = false;
		mRenderers = new ArrayList();
		mAntialiasing = true;
		mLegendHeight = 0;
		mScale = 1.0F;
		mPanEnabled = true;
		mZoomEnabled = true;
		mZoomButtonsVisible = false;
		mZoomRate = 1.5F;
		mExternalZoomEnabled = false;
		mOriginalScale = mScale;
		mClickEnabled = false;
		selectableBuffer = 15;
	}

	public String getChartTitle()
	{
		return mChartTitle;
	}

	public void setChartTitle(String s)
	{
		mChartTitle = s;
	}

	public float getChartTitleTextSize()
	{
		return mChartTitleTextSize;
	}

	public void setChartTitleTextSize(float f)
	{
		mChartTitleTextSize = f;
	}

	public void addSeriesRenderer(SimpleSeriesRenderer simpleseriesrenderer)
	{
		mRenderers.add(simpleseriesrenderer);
	}

	public void addSeriesRenderer(int i, SimpleSeriesRenderer simpleseriesrenderer)
	{
		mRenderers.add(i, simpleseriesrenderer);
	}

	public void removeSeriesRenderer(SimpleSeriesRenderer simpleseriesrenderer)
	{
		mRenderers.remove(simpleseriesrenderer);
	}

	public SimpleSeriesRenderer getSeriesRendererAt(int i)
	{
		return (SimpleSeriesRenderer)mRenderers.get(i);
	}

	public int getSeriesRendererCount()
	{
		return mRenderers.size();
	}

	public SimpleSeriesRenderer[] getSeriesRenderers()
	{
		return (SimpleSeriesRenderer[])mRenderers.toArray(new SimpleSeriesRenderer[0]);
	}

	public int getBackgroundColor()
	{
		return mBackgroundColor;
	}

	public void setBackgroundColor(int i)
	{
		mBackgroundColor = i;
	}

	public boolean isApplyBackgroundColor()
	{
		return mApplyBackgroundColor;
	}

	public void setApplyBackgroundColor(boolean flag)
	{
		mApplyBackgroundColor = flag;
	}

	public int getAxesColor()
	{
		return mAxesColor;
	}

	public void setAxesColor(int i)
	{
		mAxesColor = i;
	}

	public int getLabelsColor()
	{
		return mLabelsColor;
	}

	public void setLabelsColor(int i)
	{
		mLabelsColor = i;
	}

	public float getLabelsTextSize()
	{
		return mLabelsTextSize;
	}

	public void setLabelsTextSize(float f)
	{
		mLabelsTextSize = f;
	}

	public boolean isShowAxes()
	{
		return mShowAxes;
	}

	public void setShowAxes(boolean flag)
	{
		mShowAxes = flag;
	}

	public boolean isShowLabels()
	{
		return mShowLabels;
	}

	public void setShowLabels(boolean flag)
	{
		mShowLabels = flag;
	}

	public boolean isShowGrid()
	{
		return mShowGrid;
	}

	public void setShowGrid(boolean flag)
	{
		mShowGrid = flag;
	}

	public boolean isShowCustomTextGrid()
	{
		return mShowCustomTextGrid;
	}

	public void setShowCustomTextGrid(boolean flag)
	{
		mShowCustomTextGrid = flag;
	}

	public boolean isShowLegend()
	{
		return mShowLegend;
	}

	public void setShowLegend(boolean flag)
	{
		mShowLegend = flag;
	}

	public boolean isFitLegend()
	{
		return mFitLegend;
	}

	public void setFitLegend(boolean flag)
	{
		mFitLegend = flag;
	}

	public String getTextTypefaceName()
	{
		return mTextTypefaceName;
	}

	public int getTextTypefaceStyle()
	{
		return mTextTypefaceStyle;
	}

	public float getLegendTextSize()
	{
		return mLegendTextSize;
	}

	public void setLegendTextSize(float f)
	{
		mLegendTextSize = f;
	}

	public void setTextTypeface(String s, int i)
	{
		mTextTypefaceName = s;
		mTextTypefaceStyle = i;
	}

	public boolean isAntialiasing()
	{
		return mAntialiasing;
	}

	public void setAntialiasing(boolean flag)
	{
		mAntialiasing = flag;
	}

	public float getScale()
	{
		return mScale;
	}

	public float getOriginalScale()
	{
		return mOriginalScale;
	}

	public void setScale(float f)
	{
		mScale = f;
	}

	public boolean isZoomEnabled()
	{
		return mZoomEnabled;
	}

	public void setZoomEnabled(boolean flag)
	{
		mZoomEnabled = flag;
	}

	public boolean isZoomButtonsVisible()
	{
		return mZoomButtonsVisible;
	}

	public void setZoomButtonsVisible(boolean flag)
	{
		mZoomButtonsVisible = flag;
	}

	public boolean isExternalZoomEnabled()
	{
		return mExternalZoomEnabled;
	}

	public void setExternalZoomEnabled(boolean flag)
	{
		mExternalZoomEnabled = flag;
	}

	public float getZoomRate()
	{
		return mZoomRate;
	}

	public boolean isPanEnabled()
	{
		return mPanEnabled;
	}

	public void setPanEnabled(boolean flag)
	{
		mPanEnabled = flag;
	}

	public void setZoomRate(float f)
	{
		mZoomRate = f;
	}

	public boolean isClickEnabled()
	{
		return mClickEnabled;
	}

	public void setClickEnabled(boolean flag)
	{
		mClickEnabled = flag;
	}

	public int getSelectableBuffer()
	{
		return selectableBuffer;
	}

	public void setSelectableBuffer(int i)
	{
		selectableBuffer = i;
	}

	public int getLegendHeight()
	{
		return mLegendHeight;
	}

	public void setLegendHeight(int i)
	{
		mLegendHeight = i;
	}

	public int[] getMargins()
	{
		return mMargins;
	}

	public void setMargins(int ai[])
	{
		mMargins = ai;
	}

	public boolean isInScroll()
	{
		return mInScroll;
	}

	public void setInScroll(boolean flag)
	{
		mInScroll = flag;
	}

	static 
	{
		REGULAR_TEXT_FONT = Typeface.create(Typeface.SERIF, 0);
	}
}
